<template>
    <!-- 编程式跳转 -->
    <button @click="goBack">后退</button>
    <h4>用户{{ $route.params.id }}的详情页面</h4>
</template>

<script setup>
import { useRouter } from 'vue-router'
const router = useRouter()
const goBack = () => {
    router.back() // 回退一步
    // router.go(-1)
}
</script>

<style scoped>

</style>